<template>
  <div class="user-avatar-dropdown">
    <Dropdown @on-click="handleClick">
      用户
      <Icon :size="18" type="md-arrow-dropdown"></Icon>
      <DropdownMenu slot="list">
        <DropdownItem name="modifyPasswordApi">修改密码</DropdownItem>
      </DropdownMenu>
    </Dropdown>
  </div>
</template>

<script>
import './user.less'
export default {
  name: 'User',
  props: {},
  methods: {
    modifyPassword() {
      //todo 修改密码
    },
    handleClick(name) {
      switch (name) {
        case 'modifyPasswordApi':
          this.modifyPassword()
          break
      }
    },
  },
}
</script>
